package com.miracle9.game.enums;

import java.util.ArrayList;
import java.util.List;

public enum GameTypeEnums {

    GT_0(0, "幸运六狮", "Lucky lion"),
    GT_1(1, "摇钱树", "Monkey tree"),
    GT_2(2, "单挑", "One-poker"),
    GT_3(3, "牛魔王", "10000 fishing"),
    GT_4(4, "QQ美人鱼", "QQ Mermaid"),
    GT_5(5, "缺一门", "Lacking a suit"),
    GT_6(6, "欢乐牛牛", "Happy Bull"),
    GT_7(7, "水浒传", "Water Margin"),
    GT_9(9, "千炮专版", "1000 fishing"),
    GT_10(10, "万炮专版", "10000 fishing"),
    GT_11(11, "海王2", "fish king 2"),
    GT_20(20, "李逵劈鱼", "Li Kui chops fish"),
    GT_37(37, "金蟾捕鱼", "Golden toad fish"),
    GT_42(42, "金鲨银鲨", "Golden Silver Shark"),
    GT_52(52, "奔驰宝马", "bcbm"),
    GT_92(92, "大闹天宫", "Havoc in heaven"),
    GT_100(100, "大厅", "Hall"),
    GT_103(103, "龙虎斗", "Dragon Tiger Battle"),
    GT_104(104, "水果机", "Fruit machine");

    private Integer type;
    private String name;
    private String ename;

    GameTypeEnums(Integer type, String name, String ename) {
        this.type = type;
        this.name = name;
        this.ename = ename;
    }

    public static List<Integer> gameTypes() {
        List<Integer> gameTypes = new ArrayList<>();
        gameTypes.add(GT_0.getType());
        gameTypes.add(GT_1.getType());
        gameTypes.add(GT_2.getType());
        gameTypes.add(GT_3.getType());
        gameTypes.add(GT_4.getType());
        gameTypes.add(GT_7.getType());
        gameTypes.add(GT_20.getType());
        gameTypes.add(GT_37.getType());
        return gameTypes;
    }

    public static GameTypeEnums getByType(Integer type) {
        for (GameTypeEnums typeEnums : GameTypeEnums.values()) {
            if (typeEnums.getType().equals(type)) {
                return typeEnums;
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public String getEname() {
        return ename;
    }
}
